/*
 * Created on May 25, 2004
 * by Mihai Postelnicu
 * email mihai@code.ro
 *
 *
 */
package ro.gateway.aida.search;

import java.util.Date;


/**
 * @author Mihai Postelnicu
 * email mihai@code.ro
 */
public class DateCell extends ResultCell {

	public DateCell(String type) {
    	super(type);
    }
	
    protected Date item;
    public int compareTo(Object o) {
        DateCell dc=(DateCell)o;
        return item.compareTo(dc.getItem());
    }

    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    public String toString() {        
    	if(item==null) return super.toString();
    	return item.toString();
    }

    /**
     * @return Returns the item.
     */
    public Date getItem() {
        return item;
    }
    /**
     * @param item The item to set.
     */
    public void setItem(Date item) {
        this.item = item;
    }
}
